package com.ftg.learn.chapter08.interface1.carinterface;

import lombok.Data;
import lombok.ToString;

/**
 * 电车 类
 *
 * @author lijiaxin
 * @version 1.0
 * @date 2023/7/27 14:20
 */
@Data
@ToString(callSuper = true)
public class Tram extends Car {

    private boolean existPool;

    public void dian(){
        System.out.println("有电池");
    }

    public Tram(String color,String brand,String sub_brand,boolean existPool){
        super(color,brand,sub_brand);
        this.existPool=existPool;
    }

    @Override
    public void Emissions() {
        System.out.println("排放量不能超过10");
    }

    public static void main(String[] args) {
        Car c1=new Car("红色","福特","野马");
        System.out.println(c1);
        c1.Emissions();
        Tram t1=new Tram("绿色","大众","高尔夫",true);
        System.out.println(t1);
        t1.Emissions();
    }
}
